#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include "Plus.h"
#include "Minus.h"
#include "Produs.h"
#include "Necunoscuta.h"
#include "Constanta.h"
#include "Impartire.h"
#include "Sin.h"
#include "Cos.h"
#include "Putere.h"
#include "Tan.h"
#include "Ctan.h"
#include <stack>
#ifndef Lab12_calcul_functie_Expresie_h
#define Lab12_calcul_functie_Expresie_h

class Functie
{    
    std::string expresie;
    std::vector<std::string>polonez;
    std::stack<Nod*>stNod;
    struct op
    {
        int val;
        std::string type;
       
        explicit op(int v, std::string c)
        {
            val=v;
            type=c;
        }
        explicit op(int v, char c)
        {
            val=v;
            type=c;
        }
        std::string getType()
        {
            std::ostringstream t1;
            t1<<type;
            return t1.str();
        }
        op():type("="),val(0){}
    };
public:
    Functie(std::string);
    void formaPoloneza();
    long double calcul();
    void creareArbore();
    void print();
    std::string getExpr();
    void setExpr();
    int paranteza;
    int isOperator(char);
    std::vector<op> operatori;
    std::string derivare();
    
};

#endif
